﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataDictionaryList.aspx.cs" Inherits="SysManage.Module.BaseInfo.DataDictionaryList" %>


<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>
    <style type="text/css">
       
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" runat="server"></f:PageManager>
        <f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server">
            <Regions>
                <f:Region ID="Region1" ShowBorder="false" ShowHeader="false" Width="350px" Position="Left" Layout="Fit" BodyPadding="5px" runat="server">
                    <Items>
                        <f:Grid ID="Grid1" runat="server" ShowBorder="true" ShowHeader="false" EnableCheckBoxSelect="false" DataKeyNames="DDicType"
                            AllowSorting="false" OnSort="Grid1_Sort" SortField="DDicType" SortDirection=""
                            AllowPaging="false" EnableMultiSelect="false" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true" >
                          
                            <Columns>
                                <f:RowNumberField></f:RowNumberField>
                                <f:BoundField DataField="DDicType" SortField="DDicType" ExpandUnusedSpace="true" HeaderText="字典类型"></f:BoundField>
                            </Columns>
                        </f:Grid>
                    </Items>
                </f:Region>
                <f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Left" BodyPadding="5px 5px 5px 0" runat="server">
                    <Items>
                        <%--<f:Form  ID="Form3" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false" ShowBorder="false" LabelAlign="Right">
                            <Rows>
                                <f:FormRow ID="FormRow2" runat="server">
                                    <Items>
                                        <f:TwinTriggerBox ID="ttbSearch" runat="server" ShowLabel="false" EmptyText="在题目中搜索" Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchUser_Trigger2Click" OnTrigger1Click="ttbSearchUser_Trigger1Click">
                                        </f:TwinTriggerBox>


                                    </Items>
                                </f:FormRow>
                            </Rows>
                        </f:Form>--%>
                        <f:Grid ID="Grid2" runat="server" BoxFlex="1" ShowBorder="true" ShowHeader="false" EnableCheckBoxSelect="true"
                            DataKeyNames="ID" AllowSorting="false"
                            OnSort="Grid2_Sort" SortField="OrderNo"
                            SortDirection="" AllowPaging="true"
                            IsDatabasePaging="true" OnPreDataBound="Grid2_PreDataBound" OnRowCommand="Grid2_RowCommand" OnPageIndexChange="Grid2_PageIndexChange">
                            <Toolbars>
                                <f:Toolbar ID="Toolbar1" runat="server">
                                    <Items>
                                        <f:Button ID="btnDeleteSelected" Icon="Delete" runat="server" ConfirmText="确认要删除选中记录？" Text="删除选中记录" OnClick="btnDeleteSelected_Click">
                                        </f:Button>
                                        <f:ToolbarSeparator runat="server">
                                        </f:ToolbarSeparator>

                                        <f:ToolbarFill ID="ToolbarFill1" runat="server">
                                        </f:ToolbarFill>
                                        <f:Button ID="btnNew" runat="server" Icon="Add" EnablePostBack="false" Text="新增">
                                        </f:Button>
                                    </Items>
                                </f:Toolbar>
                            </Toolbars>
                            <PageItems>
                                <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                                </f:ToolbarSeparator>
                                <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数：">
                                </f:ToolbarText>
                                <f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" runat="server">
                                    <f:ListItem Text="10" Value="10"></f:ListItem>
                                    <f:ListItem Text="20" Value="20"></f:ListItem>
                                    <f:ListItem Text="50" Value="50"></f:ListItem>
                                    <f:ListItem Text="100" Value="100"></f:ListItem>
                                </f:DropDownList>
                            </PageItems>
                            <Columns>
                                <f:RowNumberField></f:RowNumberField>
                                <f:BoundField DataField="DDicMemberName" SortField="DDicMemberName" ExpandUnusedSpace="true" HeaderText="成员名称"></f:BoundField>
                                <f:BoundField DataField="DDicMember" SortField="DDicMember" Width="200px" HeaderText="成员值"></f:BoundField>
                                <f:BoundField DataField="OrderNo" SortField="OrderNo" Width="60px" HeaderText="序号"></f:BoundField>
                                <f:WindowField ColumnID="editField" TextAlign="Center" Icon="Pencil" HeaderText="编辑" ToolTip="编辑" WindowID="Window1"
                                    Title="编辑" DataIFrameUrlFields="ID"
                                    DataIFrameUrlFormatString="~/app/SysManage/Module/BaseInfo/DataDictionaryEdit.aspx?id={0}"
                                    Width="50px" />
                                <f:LinkButtonField ColumnID="deleteField" TextAlign="Center" Icon="Delete"
                                    ToolTip="删除" ConfirmText="确定删除此数据？" ConfirmTarget="Top" HeaderText="删除" CommandName="Delete" Width="50px">
                                </f:LinkButtonField>
                            </Columns>
                        </f:Grid>
                    </Items>
                </f:Region>
            </Regions>
        </f:RegionPanel>
        <f:Window ID="Window1" CloseAction="Hide" runat="server" IsModal="true"
             Hidden="true" Target="Top" EnableResize="true" EnableMaximize="true" 
            EnableIFrame="true" IFrameUrl="about:blank" Width="750px" Height="250px" OnClose="Window1_Close">
        </f:Window>
        <f:HiddenField ID="firstLoad" runat="server">
        </f:HiddenField>
    </form>
</body>
</html>
<script src=".././../../../Scripts/jquery.min.js"></script>
<script type="text/javascript">
     var firstLoadClientID = '<%= firstLoad.ClientID %>';
       
        var gridClientID = '<%= Grid1.ClientID %>';
 
    function firstLoadRows() {
            // 增加延迟，等待HiddenField更新完毕
            window.setTimeout(function () {
                var selectFirstRow = F(firstLoadClientID);
                if (selectFirstRow.getValue() == 1) {
                    $("#" + gridClientID).find('tr[role="row"]').eq(0).addClass('x-grid-row-selected');
                } else {
                    $("#" + gridClientID).find('tr[role="row"]').eq(0).removeClass('x-grid-row-selected');
                }
                selectFirstRow.setValue(0);
               // alert(selectFirstRow.getValue());

            }, 100);
        }
 
        // 页面第一个加载完毕后执行的函数
    F.ready(function () {
     
        firstLoadRows();
        });
    function removeSelectCss() {
        $("#" + gridClientID).find('tr[role="row"]').eq(0).removeClass('x-grid-row-selected');
    }
</script>

